home *** CD-ROM | disk | FTP | other *** search
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- NNNNAAAAMMMMEEEE
- QFont - Font used for drawing text
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- #include <qfont.h>
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
- eeeennnnuuuummmm SSSSttttyyyylllleeeeHHHHiiiinnnntttt {{{{ HHHHeeeellllvvvveeeettttiiiiccccaaaa,,,, TTTTiiiimmmmeeeessss,,,, CCCCoooouuuurrrriiiieeeerrrr,,,, OOOOllllddddEEEEnnnngggglllliiiisssshhhh,,,,
- SSSSyyyysssstttteeeemmmm,,,, AAAAnnnnyyyySSSSttttyyyylllleeee,,,, SSSSaaaannnnssssSSSSeeeerrrriiiiffff ==== HHHHeeeellllvvvveeeettttiiiiccccaaaa,,,, SSSSeeeerrrriiiiffff ==== TTTTiiiimmmmeeeessss,,,,
- TTTTyyyyppppeeeeWWWWrrrriiiitttteeeerrrr ==== CCCCoooouuuurrrriiiieeeerrrr,,,, DDDDeeeeccccoooorrrraaaattttiiiivvvveeee ==== OOOOllllddddEEEEnnnngggglllliiiisssshhhh}}}}
- eeeennnnuuuummmm WWWWeeeeiiiigggghhhhtttt {{{{ LLLLiiiigggghhhhtttt ==== 22225555,,,, NNNNoooorrrrmmmmaaaallll ==== 55550000,,,, DDDDeeeemmmmiiiiBBBBoooolllldddd ==== 66663333,,,, BBBBoooolllldddd ====
- 77775555,,,, BBBBllllaaaacccckkkk ==== 88887777 }}}}
- eeeennnnuuuummmm CCCChhhhaaaarrrrSSSSeeeetttt {{{{ LLLLaaaattttiiiinnnn1111,,,, IIIISSSSOOOO____8888888855559999____1111 ==== LLLLaaaattttiiiinnnn1111,,,, AAAAnnnnyyyyCCCChhhhaaaarrrrSSSSeeeetttt,,,,
- LLLLaaaattttiiiinnnn2222,,,, IIIISSSSOOOO____8888888855559999____2222 ==== LLLLaaaattttiiiinnnn2222,,,, LLLLaaaattttiiiinnnn3333,,,, IIIISSSSOOOO____8888888855559999____3333 ====
- LLLLaaaattttiiiinnnn3333,,,, LLLLaaaattttiiiinnnn4444,,,, IIIISSSSOOOO____8888888855559999____4444 ==== LLLLaaaattttiiiinnnn4444,,,, LLLLaaaattttiiiinnnn5555,,,, IIIISSSSOOOO____8888888855559999____5555
- ==== LLLLaaaattttiiiinnnn5555,,,, LLLLaaaattttiiiinnnn6666,,,, IIIISSSSOOOO____8888888855559999____6666 ====
- QQQQFFFFoooonnnntttt (((())))
- QQQQFFFFoooonnnntttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _f_a_m_i_l_y,,,, iiiinnnntttt _p_o_i_n_t_S_i_z_e ==== 11112222,,,, iiiinnnntttt _w_e_i_g_h_t
- QQQQFFFFoooonnnntttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _f_a_m_i_l_y,,,, iiiinnnntttt _p_o_i_n_t_S_i_z_e,,,, iiiinnnntttt _w_e_i_g_h_t
- QQQQFFFFoooonnnntttt (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ))))
- vvvviiiirrrrttttuuuuaaaallll ~~~~QQQQFFFFoooonnnntttt ()
- QQQQFFFFoooonnnntttt&&&& ooooppppeeeerrrraaaattttoooorrrr==== (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ))))
- ccccoooonnnnsssstttt cccchhhhaaaarrrr**** ffffaaaammmmiiiillllyyyy (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttFFFFaaaammmmiiiillllyyyy (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ))))
- iiiinnnntttt ppppooooiiiinnnnttttSSSSiiiizzzzeeee (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttPPPPooooiiiinnnnttttSSSSiiiizzzzeeee (((( iiiinnnntttt ))))
- iiiinnnntttt wwwweeeeiiiigggghhhhtttt (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttWWWWeeeeiiiigggghhhhtttt (((( iiiinnnntttt ))))
- bbbboooooooollll bbbboooolllldddd (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttBBBBoooolllldddd (((( bbbboooooooollll ))))
- bbbboooooooollll iiiittttaaaalllliiiicccc (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttIIIIttttaaaalllliiiicccc (((( bbbboooooooollll ))))
- bbbboooooooollll uuuunnnnddddeeeerrrrlllliiiinnnneeee (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttUUUUnnnnddddeeeerrrrlllliiiinnnneeee (((( bbbboooooooollll ))))
- bbbboooooooollll ssssttttrrrriiiikkkkeeeeOOOOuuuutttt (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttSSSSttttrrrriiiikkkkeeeeOOOOuuuutttt (((( bbbboooooooollll ))))
- bbbboooooooollll ffffiiiixxxxeeeeddddPPPPiiiittttcccchhhh (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttFFFFiiiixxxxeeeeddddPPPPiiiittttcccchhhh (((( bbbboooooooollll ))))
- SSSSttttyyyylllleeeeHHHHiiiinnnntttt ssssttttyyyylllleeeeHHHHiiiinnnntttt (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttSSSSttttyyyylllleeeeHHHHiiiinnnntttt (((( SSSSttttyyyylllleeeeHHHHiiiinnnntttt ))))
- CCCChhhhaaaarrrrSSSSeeeetttt cccchhhhaaaarrrrSSSSeeeetttt (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttCCCChhhhaaaarrrrSSSSeeeetttt (((( CCCChhhhaaaarrrrSSSSeeeetttt ))))
- bbbboooooooollll rrrraaaawwwwMMMMooooddddeeee (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttRRRRaaaawwwwMMMMooooddddeeee (((( bbbboooooooollll ))))
- bbbboooooooollll eeeexxxxaaaaccccttttMMMMaaaattttcccchhhh (((()))) ccccoooonnnnsssstttt
- bbbboooooooollll ooooppppeeeerrrraaaattttoooorrrr======== (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& )))) ccccoooonnnnsssstttt
- bbbboooooooollll ooooppppeeeerrrraaaattttoooorrrr!!!!==== (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& )))) ccccoooonnnnsssstttt
- bbbboooooooollll iiiissssCCCCooooppppyyyyOOOOffff (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& )))) ccccoooonnnnsssstttt
- HHHHAAAANNNNDDDDLLLLEEEE hhhhaaaannnnddddlllleeee (((( HHHHAAAANNNNDDDDLLLLEEEE====0000 )))) ccccoooonnnnsssstttt
- QQQQSSSSttttrrrriiiinnnngggg kkkkeeeeyyyy (((()))) ccccoooonnnnsssstttt
-
- SSSSttttaaaattttiiiicccc PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
-
-
-
- PPPPaaaaggggeeee 1111 ((((pppprrrriiiinnnntttteeeedddd 9999////22222222////99998888))))
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt&&&& ddddeeeeffffaaaauuuullllttttFFFFoooonnnntttt (((())))
- vvvvooooiiiidddd sssseeeettttDDDDeeeeffffaaaauuuullllttttFFFFoooonnnntttt (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ))))
- ccccoooonnnnsssstttt cccchhhhaaaarrrr**** ssssuuuubbbbssssttttiiiittttuuuutttteeee (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffaaaammmmiiiillllyyyyNNNNaaaammmmeeee ))))
- vvvvooooiiiidddd iiiinnnnsssseeeerrrrttttSSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr ****,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ))))
- vvvvooooiiiidddd rrrreeeemmmmoooovvvveeeeSSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ))))
- vvvvooooiiiidddd lllliiiissssttttSSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnnssss (((( QQQQSSSSttttrrrrLLLLiiiisssstttt **** ))))
- vvvvooooiiiidddd iiiinnnniiiittttiiiiaaaalllliiiizzzzeeee (((())))
- vvvvooooiiiidddd cccclllleeeeaaaannnnuuuupppp (((())))
- vvvvooooiiiidddd ccccaaaacccchhhheeeeSSSSttttaaaattttiiiissssttttiiiiccccssss (((())))
-
- PPPPrrrrooootttteeeecccctttteeeedddd MMMMeeeemmmmbbbbeeeerrrrssss
- bbbboooooooollll ddddiiiirrrrttttyyyy (((()))) ccccoooonnnnsssstttt
- QQQQSSSSttttrrrriiiinnnngggg ddddeeeeffffaaaauuuullllttttFFFFaaaammmmiiiillllyyyy (((()))) ccccoooonnnnsssstttt
- QQQQSSSSttttrrrriiiinnnngggg llllaaaassssttttRRRReeeessssoooorrrrttttFFFFaaaammmmiiiillllyyyy (((()))) ccccoooonnnnsssstttt
- QQQQSSSSttttrrrriiiinnnngggg llllaaaassssttttRRRReeeessssoooorrrrttttFFFFoooonnnntttt (((()))) ccccoooonnnnsssstttt
- iiiinnnntttt ddddeeeecccciiiiPPPPooooiiiinnnnttttSSSSiiiizzzzeeee (((()))) ccccoooonnnnsssstttt
-
- RRRREEEELLLLAAAATTTTEEEEDDDD FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
- (Note that these are not member functions.)
- QQQQDDDDaaaattttaaaaSSSSttttrrrreeeeaaaammmm &&&& ooooppppeeeerrrraaaattttoooorrrr<<<<<<<< ((((QQQQDDDDaaaattttaaaaSSSSttttrrrreeeeaaaammmm &&&& _s,,,, ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& _f))))
- QQQQDDDDaaaattttaaaaSSSSttttrrrreeeeaaaammmm &&&& ooooppppeeeerrrraaaattttoooorrrr>>>>>>>> ((((QQQQDDDDaaaattttaaaaSSSSttttrrrreeeeaaaammmm &&&& _s,,,, QQQQFFFFoooonnnntttt &&&& _f))))
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The QFont class specifies a font used for drawing text.
-
- QFont, more precisely, is a collection of attributes of a
- font. When Qt needs to draw text, it will look up and load
- the closest matching installed font and draw using that.
-
- The most important attributes of a QFont are family, point
- size, weight and italic. There are QFont constructors that
- take these attributes as arguments, as shown in this
- example:
-
- void MyWidget::paintEvent( QPaintEvent * )
- {
- QPainter p( this );
- // times, 12pt, normal
- p.setFont( QFont( "times" ) );
- p.drawText( 10, 20, "Text1" );
- // helvetica, 18pt, normal
- p.setFont( QFont( "helvetica", 18 ) );
- p.drawText( 10, 120, "Text2" );
- // courier, 24pt, bold
- p.setFont( QFont( "courier", 24, QFont::Bold ) );
- p.drawText( 10, 220, "Text3" );
- // lucida, 36pt, bold, italic
- p.setFont( QFont( "lucida", 36, QFont::Bold, TRUE ) );
- p.drawText( 10, 320, "Text4" );
- }
-
- The default QFont constructor makes a copy of the default
-
-
-
- Page 2 (printed 9/22/98)
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- font.
-
- You can also change these attributes of an existing QFont
- object using functions such as setFamily(), setPointSize(),
- setWeight() and setItalic().
-
- There are also some less-used attributes. setUnderline()
- decides whether the font is underlined or not;
- setStrikeOut() can be used to get overstrike (a horizontal
- line through the middle of the characters); setFixedPitch()
- determines whether Qt should give preference to fixed-pitch
- or variable-pitch fonts when it needs to choose an installed
- font; setStyleHint() can be used to offer more general help
- to the font matching algorithm, and on X11 setRawMode() can
- be used to bypass the entire font matching and use an X11
- XLFD.
-
- Of course there is also a reader function for each of these
- set*() functions. Note that the reader functions return the
- values previously set, _n_o_t the attributes of the actual
- window system font that will be used for drawing. You can
- get information about the font that will be used for drawing
- by using QFontInfo, but be aware that QFontInfo may be slow
- and that its results depend on what fonts are installed.
-
- In general font handling and loading are costly operations,
- especially on X11. The QFont class contains extensive
- optimizations to make copying of QFont objects fast, and to
- cache the results of the slow window system functions it
- uses.
-
- QFont also offers a few static functions, mostly to tune the
- font matching algorithm: You can control what happens if a
- font's family isn't installed using insertSubstitution() and
- removeSubstitution(), ask what happens for a single family
- uing substitute() and you can get a complete list of the
- fallback families using listSubstitutions().
-
- cacheStatistics() offers cache effectiveness information;
- this is useful mostly for debugging.
-
- Finally, setDefaultFont() allows you to set the default
- font. The default default font is chosen at application
- startup from a set of common installed fonts that support
- the correct character set. Of course, the initialization
- algorithm has a default, too: The default default default
- font!
-
- For more general information on fonts, see the Internet Font
- Archive and in particular its extensive FAQs:
-
- Questions about fonts in general (from comp.fonts)
-
-
-
- Page 3 (printed 9/22/98)
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- Questions about the IFA and fonts on the Internet.
-
- See also: QFontMetrics, QFontInfo, QApplication::setFont(),
- QWidget::setFont(), QPainter::setFont(), QFont::StyleHint,
- QFont::CharSet and QFont::Weight.
-
- Examples: grapher/grapher.cpp desktop/desktop.cpp
- drawdemo/drawdemo.cpp movies/main.cpp picture/picture.cpp
- xform/xform.cpp widgets/widgets.cpp
-
- MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
- QQQQFFFFoooonnnntttt::::::::QQQQFFFFoooonnnntttt (((())))
- Constructs a font object that refers to the default font.
-
- QQQQFFFFoooonnnntttt::::::::QQQQFFFFoooonnnntttt (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ffffoooonnnntttt ))))
- Constructs a font that is a copy of _f_o_n_t.
-
- QQQQFFFFoooonnnntttt::::::::QQQQFFFFoooonnnntttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffaaaammmmiiiillllyyyy,,,, iiiinnnntttt ppppooooiiiinnnnttttSSSSiiiizzzzeeee ==== 11112222,,,, iiiinnnntttt
- wwwweeeeiiiigggghhhhtttt ==== NNNNoooorrrrmmmmaaaallll,,,, bbbboooooooollll iiiittttaaaalllliiiicccc ==== FFFFAAAALLLLSSSSEEEE ))))
- Constructs a font object with the specified _f_a_m_i_l_y,
- _p_o_i_n_t_S_i_z_e, _w_e_i_g_h_t and _i_t_a_l_i_c settings. The character set is
- copied from the default font and the rest of the settings
- ser set reasonably.
-
- If _p_o_i_n_t_S_i_z_e is less than or equal to 0 it is set to 1.
-
- See also: setFamily(), setPointSize(), setWeight() and
- setItalic().
-
- QQQQFFFFoooonnnntttt::::::::QQQQFFFFoooonnnntttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffaaaammmmiiiillllyyyy,,,, iiiinnnntttt ppppooooiiiinnnnttttSSSSiiiizzzzeeee,,,, iiiinnnntttt wwwweeeeiiiigggghhhhtttt,,,,
- bbbboooooooollll iiiittttaaaalllliiiicccc,,,, CCCChhhhaaaarrrrSSSSeeeetttt cccchhhhaaaarrrrSSSSeeeetttt ))))
- Constructs a font object with the specified _f_a_m_i_l_y,
- _p_o_i_n_t_S_i_z_e, _w_e_i_g_h_t, _i_t_a_l_i_c and _c_h_a_r_S_e_t settings. If _p_o_i_n_t_S_i_z_e
- is less than or equal to 0 it is set to 1.
-
- See also: setFamily(), setPointSize(), setWeight() and
- setItalic().
-
- QQQQFFFFoooonnnntttt::::::::~~~~QQQQFFFFoooonnnntttt (((()))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Destroys the font object.
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::bbbboooolllldddd (((()))) ccccoooonnnnsssstttt
- Returns TRUE if weight() is a value greater than
- QFont::Normal, otherwise FALSE.
-
- See also: weight(), setBold() and QFontInfo::bold().
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::ccccaaaacccchhhheeeeSSSSttttaaaattttiiiissssttttiiiiccccssss (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Internal function that dumps font cache statistics.
-
- QQQQFFFFoooonnnntttt::::::::CCCChhhhaaaarrrrSSSSeeeetttt QQQQFFFFoooonnnntttt::::::::cccchhhhaaaarrrrSSSSeeeetttt(((()))) ccccoooonnnnsssstttt
- Returns the character set by setCharSet().
-
-
-
- Page 4 (printed 9/22/98)
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- Use QFontInfo to find the CharSet of the window system font
- actually used.
-
- See also: setCharSet().
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::cccclllleeeeaaaannnnuuuupppp (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Internal function that cleans up the font system.
-
- iiiinnnntttt QQQQFFFFoooonnnntttt::::::::ddddeeeecccciiiiPPPPooooiiiinnnnttttSSSSiiiizzzzeeee (((()))) ccccoooonnnnsssstttt [[[[pppprrrrooootttteeeecccctttteeeedddd]]]]
- Returns the point size in 1/10ths of a point.
-
- See also: pointSize().
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQFFFFoooonnnntttt::::::::ddddeeeeffffaaaauuuullllttttFFFFaaaammmmiiiillllyyyy (((()))) ccccoooonnnnsssstttt [[[[pppprrrrooootttteeeecccctttteeeedddd]]]]
- Returns the family name that corresponds to the current
- style hint.
-
- ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& QQQQFFFFoooonnnntttt::::::::ddddeeeeffffaaaauuuullllttttFFFFoooonnnntttt (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the system default font.
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::ddddiiiirrrrttttyyyy (((()))) ccccoooonnnnsssstttt [[[[pppprrrrooootttteeeecccctttteeeedddd]]]]
- Returns TRUE if the font attributes have been changed and
- the font has to be (re)loaded, or FALSE if no changes have
- been made.
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::eeeexxxxaaaaccccttttMMMMaaaattttcccchhhh (((()))) ccccoooonnnnsssstttt
- Returns TRUE if a window system font exactly matching the
- settings of this font is available.
-
- See also: QFontInfo and font matching
-
- ccccoooonnnnsssstttt cccchhhhaaaarrrr **** QQQQFFFFoooonnnntttt::::::::ffffaaaammmmiiiillllyyyy (((()))) ccccoooonnnnsssstttt
- Returns the family name set by setFamily().
-
- Use QFontInfo to find the family name of the window system
- font that is actually used for drawing.
-
- Example:
-
- QFont font( "Nairobi" );
- QFontInfo info( font );
- debug( "Font family requested is : \"%s\"", font.family() );
- debug( "Font family actually used is: \"%s\"", info.family() );
-
- See also: setFamily() and substitute().
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::ffffiiiixxxxeeeeddddPPPPiiiittttcccchhhh (((()))) ccccoooonnnnsssstttt
- Returns the value set by setFixedPitch().
-
- Use QFontInfo to find the fixed pitch value of the window
- system font actually used.
-
-
-
-
- Page 5 (printed 9/22/98)
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- See also: setFixedPitch() and QFontInfo::fixedPitch().
-
- HHHHAAAANNNNDDDDLLLLEEEE QQQQFFFFoooonnnntttt::::::::hhhhaaaannnnddddlllleeee (((( HHHHAAAANNNNDDDDLLLLEEEE====0000 )))) ccccoooonnnnsssstttt
- Returns the window system handle to the font, for low-level
- access. _U_s_i_n_g _t_h_i_s _f_u_n_c_t_i_o_n _i_s _n_o_t _p_o_r_t_a_b_l_e.
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::iiiinnnniiiittttiiiiaaaalllliiiizzzzeeee (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Internal function that initializes the font system.
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::iiiinnnnsssseeeerrrrttttSSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffaaaammmmiiiillllyyyyNNNNaaaammmmeeee,,,, ccccoooonnnnsssstttt
- cccchhhhaaaarrrr **** rrrreeeeppppllllaaaacccceeeemmmmeeeennnnttttNNNNaaaammmmeeee )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Inserts a new font family name substitution in the family
- substitution table.
-
- If _f_a_m_i_l_y_N_a_m_e already exists in the substitution table, it
- will be replaced with this new substitution.
-
- See also: removeSubstitution(), listSubstitutions() and
- substitute().
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::iiiissssCCCCooooppppyyyyOOOOffff (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ffff )))) ccccoooonnnnsssstttt
- Returns TRUE if this font and _f are copies of each other,
- ie. one of them was created as a copy of the other and
- neither was subsequently modified. This is much stricter
- than equality.
-
- See also: operator= and operator==.
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::iiiittttaaaalllliiiicccc (((()))) ccccoooonnnnsssstttt
- Returns the value set by setItalic().
-
- Use QFontInfo to find the italic value of the window system
- font actually used.
-
- See also: setItalic().
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQFFFFoooonnnntttt::::::::kkkkeeeeyyyy (((()))) ccccoooonnnnsssstttt
- Returns the font's key, which is a textual representation of
- the font settings. It is typically used to insert and find
- fonts in a dictionary or a cache.
-
- See also: QDict and QCache.
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQFFFFoooonnnntttt::::::::llllaaaassssttttRRRReeeessssoooorrrrttttFFFFaaaammmmiiiillllyyyy (((()))) ccccoooonnnnsssstttt [[[[pppprrrrooootttteeeecccctttteeeedddd]]]]
- Returns a last resort family name for the font matching
- algorithm.
-
- See also: lastResortFont().
-
- QQQQSSSSttttrrrriiiinnnngggg QQQQFFFFoooonnnntttt::::::::llllaaaassssttttRRRReeeessssoooorrrrttttFFFFoooonnnntttt (((()))) ccccoooonnnnsssstttt [[[[pppprrrrooootttteeeecccctttteeeedddd]]]]
- Returns a last resort raw font name for the font matching
- algorithm.
-
-
-
- Page 6 (printed 9/22/98)
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- This is used if not even the last resort family is
- available.
-
- See also: lastResortFamily().
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::lllliiiissssttttSSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnnssss (((( QQQQSSSSttttrrrrLLLLiiiisssstttt **** lllliiiisssstttt )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns a sorted list of substituted family names in _l_i_s_t.
-
- See also: insertSubstitution(), removeSubstitution() and
- substitute().
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::ooooppppeeeerrrraaaattttoooorrrr!!!!==== (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ffff )))) ccccoooonnnnsssstttt
- Returns TRUE if the this font is different from _f, or FALSE
- if they are equal.
-
- Two QFonts are different if their font attributes are
- different. If raw mode is enabled for both fonts, then only
- the family fields are compared.
-
- See also: operator==().
-
- QQQQFFFFoooonnnntttt &&&& QQQQFFFFoooonnnntttt::::::::ooooppppeeeerrrraaaattttoooorrrr==== (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ffffoooonnnntttt ))))
- Assigns _f_o_n_t to this font and returns a reference to this
- font.
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::ooooppppeeeerrrraaaattttoooorrrr======== (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ffff )))) ccccoooonnnnsssstttt
- Returns TRUE if the this font is equal to _f, or FALSE if
- they are different.
-
- Two QFonts are equal if their font attributes are equal. If
- raw mode is enabled for both fonts, then only the family
- fields are compared.
-
- See also: operator!=().
-
- iiiinnnntttt QQQQFFFFoooonnnntttt::::::::ppppooooiiiinnnnttttSSSSiiiizzzzeeee (((()))) ccccoooonnnnsssstttt
- Returns the point size set by setPointSize().
-
- Use QFontInfo to find the point size of the window system
- font actually used.
-
- Example of use:
-
- QFont font( "helvetica" );
- QFontInfo info( font );
- font.setPointSize( 53 );
- debug( "Font size requested is : %d", font.pointSize() );
- debug( "Font size actually used is: %d", info.pointSize() );
-
- See also: setPointSize() and deciPointSize().
-
- Examples: xform/xform.cpp
-
-
-
- Page 7 (printed 9/22/98)
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::rrrraaaawwwwMMMMooooddddeeee (((()))) ccccoooonnnnsssstttt
- Returns the value set by setRawMode().
-
- See also: setRawMode().
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::rrrreeeemmmmoooovvvveeeeSSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffaaaammmmiiiillllyyyyNNNNaaaammmmeeee ))))
- [[[[ssssttttaaaattttiiiicccc]]]]
- Removes a font family name substitution from the family
- substitution table.
-
- See also: insertSubstitution(), listSubstitutions() and
- substitute().
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttBBBBoooolllldddd (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- Sets the weight to QFont::Bold if _e_n_a_b_l_e is TRUE, or to
- QFont::Normal if _e_n_a_b_l_e is FALSE.
-
- Use setWeight() to set the weight to other values.
-
- See also: bold() and setWeight().
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttCCCChhhhaaaarrrrSSSSeeeetttt (((( CCCChhhhaaaarrrrSSSSeeeetttt cccchhhhaaaarrrrsssseeeetttt ))))
- Sets the character set encoding (e.g. Latin1).
-
- If the character set encoding is not available another will
- be used for drawing. for most non-trivial applications you
- will probably not want this to happen since it can totally
- obscure the text shown to the user. This is why the font
- matching algorithm gives high priority to finding the
- correct character set.
-
- You can test that the character set is correct using the
- QFontInfo class.
-
- Example:
-
- QFont font( "times", 14 ); // default character set is Latin1
- QFontInfo info( font );
- if ( info.charSet() != Latin1 ) // check actual font
- fatal( "Cannot find a Latin 1 Times font" );
-
- In Qt 1.40, the following character set encodings are
- available:
-
- QFont::Latin1 - ISO 8859-1, common in much of Europe
-
- QFont::Latin2 - ISO 8859-
- 2, less common European character set
-
- QFont::Latin3 - ISO 8859-
- 3, less common European character set
-
-
-
-
- Page 8 (printed 9/22/98)
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- QFont::Latin4 - ISO 8859-
- 4, less common European character set
-
- QFont::Latin5 - ISO 8859-5, Cyrillic
-
- QFont::Latin6 - ISO 8859-6, Arabic
-
- QFont::Latin7 - ISO 8859-7, Greek
-
- QFont::Latin8 - ISO 8859-8, Hebrew
-
- QFont::Latin9 - ISO 8859-
- 9, less common European character set
-
- QFont::KOI8R - KOI8-R, Cyrillic, defined in RFC 1489.
-
- QFont::AnyCharSet - whatever is handiest.
-
- See also: charSet(), QFontInfo and font matching
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttDDDDeeeeffffaaaauuuullllttttFFFFoooonnnntttt (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ffff )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Sets the system default font.
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttFFFFaaaammmmiiiillllyyyy (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffaaaammmmiiiillllyyyy ))))
- Sets the family name of the font (e.g. "Helvetica" or
- "times").
-
- The family name is case insensitive.
-
- If the family is not available a default family is used.
-
- See also: family(), setStyleHint(), QFontInfo and font
- matching
-
- Examples: xform/xform.cpp
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttFFFFiiiixxxxeeeeddddPPPPiiiittttcccchhhh (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- Sets fixed pitch on or off.
-
- A fixed pitch font is a font where all characters have the
- same width.
-
- See also: fixedPitch(), QFontInfo and font matching
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttIIIIttttaaaalllliiiicccc (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- Sets italic on or off.
-
- See also: italic(), QFontInfo and font matching
-
- Examples: xform/xform.cpp
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttPPPPooooiiiinnnnttttSSSSiiiizzzzeeee (((( iiiinnnntttt ppppooooiiiinnnnttttSSSSiiiizzzzeeee ))))
-
-
-
- PPPPaaaaggggeeee 9999 ((((pppprrrriiiinnnntttteeeedddd 9999////22222222////99998888))))
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- Sets the point size to _p_o_i_n_t_S_i_z_e. The point size must be
- greater than zero.
-
- Example:
-
- QFont font( "courier" );
- font.setPointSize( 18 );
-
- See also: pointSize(), QFontInfo and font matching
-
- Examples: xform/xform.cpp
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttRRRRaaaawwwwMMMMooooddddeeee (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- Turns raw mode on if _e_n_a_b_l_e is TRUE, or turns it off if
- _e_n_a_b_l_e is FALSE.
-
- Calling this function only has effect under X windows. If
- raw mode is enabled, Qt will search for an X font with a
- complete font name matching the family name, ignoring all
- other values set for the QFont. If the font name matches
- several fonts, Qt will use the first font returned by X.
- QFontInfo _c_a_n_n_o_t be used to fetch information about a QFont
- using raw mode (it will return the values set in the QFont
- for all parameters, including the family name).
-
- Example:
-
- #if defined(_WS_X11_)
- QFont font( "-*-fixed-*-*-*-*-*-140-75-75-c-*-iso8859-1" );
- font.setRawMode( TRUE );
- if ( !font.exactMatch() )
- fatal( "Sorry, could not find the X specific font" );
- #endif
-
- WWWWaaaarrrrnnnniiiinnnngggg:::: Do not use raw mode unless you really need it!
-
- See also: rawMode().
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttSSSSttttrrrriiiikkkkeeeeOOOOuuuutttt (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- Sets strike out on or off.
-
- See also: strikeOut(), QFontInfo and font matching
-
- Examples: xform/xform.cpp
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttSSSSttttyyyylllleeeeHHHHiiiinnnntttt (((( SSSSttttyyyylllleeeeHHHHiiiinnnntttt hhhhiiiinnnntttt ))))
- Sets the style hint.
-
- The style hint is used by the font matching algorithm when a
- selected font family cannot be found and is used to find an
- appropriate default family.
-
-
-
-
- Page 10 (printed 9/22/98)
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- The style hint has a default value of AnyStyle which leaves
- the task of finding a good default family to the font
- matching algorithm.
-
- In this example (which is a complete program) the push
- button will display its text label with the Bavaria font
- family if this family is available, if not it will display
- its text label with another serif font:
-
- #include <qapplication.h>
- #include <qpushbutton.h>
- #include <qfont.h>
- int main( int argc, char **argv )
- {
- QApplication app( argc, argv );
- QPushButton push("Push me");
- QFont font( "Bavaria", 18 ); // preferrred family is Bavaria
- font.setStyleHint( QFont::Serif ); // can also use any serif font
- push.setFont( font );
- return app.exec( &push );
- }
-
- The other available style hints are QFont::SansSerif,
- QFont::TypeWriter, QFont::OldEnglish, QFont::System
-
- See also: styleHint(), QFontInfo and font matching
-
- Examples: desktop/desktop.cpp
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttUUUUnnnnddddeeeerrrrlllliiiinnnneeee (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- Sets underline on or off.
-
- See also: underline(), QFontInfo and font matching.
-
- Examples: xform/xform.cpp
-
- vvvvooooiiiidddd QQQQFFFFoooonnnntttt::::::::sssseeeettttWWWWeeeeiiiigggghhhhtttt (((( iiiinnnntttt wwwweeeeiiiigggghhhhtttt ))))
- Sets the weight (or boldness).
-
- The enum QFont::Weight contains the predefined font weights:
-
- QFont::Light (25)
-
- QFont::Normal (50)
-
- QFont::DemiBold (63)
-
- QFont::Bold (75)
-
- QFont::Black (87)
-
- Strictly speaking you can use all values in the range [0,99]
-
-
-
- Page 11 (printed 9/22/98)
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- (where 0 is ultralight and 99 is extremely black), but there
- is such a thing as asking too much of the underlying window
- system.
-
- Example:
-
- QFont font( "courier" );
- font.setWeight( QFont::Bold );
-
- If the specified weight is not available the closest
- available will be used. Use QFontInfo to check the actual
- weight.
-
- See also: weight(), QFontInfo and font matching
-
- Examples: xform/xform.cpp
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::ssssttttrrrriiiikkkkeeeeOOOOuuuutttt (((()))) ccccoooonnnnsssstttt
- Returns the value set by setStrikeOut().
-
- Use QFontInfo to find the strike out value of the window
- system font actually used.
-
- See also: setStrikeOut() and QFontInfo::strikeOut().
-
- QQQQFFFFoooonnnntttt::::::::SSSSttttyyyylllleeeeHHHHiiiinnnntttt QQQQFFFFoooonnnntttt::::::::ssssttttyyyylllleeeeHHHHiiiinnnntttt(((()))) ccccoooonnnnsssstttt
- Returns the StyleHint set by setStyleHint().
-
- See also: setStyleHint() and QFontInfo::styleHint().
-
- ccccoooonnnnsssstttt cccchhhhaaaarrrr **** QQQQFFFFoooonnnntttt::::::::ssssuuuubbbbssssttttiiiittttuuuutttteeee (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ffffaaaammmmiiiillllyyyyNNNNaaaammmmeeee ))))
- [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the font family name to be used whenever _f_a_m_i_l_y_N_a_m_e
- is specified, and not found by the font matching algorithm.
- The lookup is case insensitive.
-
- If there is no substitution for _f_a_m_i_l_y_N_a_m_e, then _f_a_m_i_l_y_N_a_m_e
- is returned.
-
- Example:
-
- QFont::insertSubstitution( "NewYork", "London" );
- QFont::insertSubstitution( "Paris", "Texas" );
- QFont::substitute( "NewYork" ); // returns "London"
- QFont::substitute( "PARIS" ); // returns "Texas"
- QFont::substitute( "Rome" ); // returns "Rome"
- QFont::removeSubstitution( "newyork" );
- QFont::substitute( "NewYork" ); // returns "NewYork"
-
- See also: setFamily(), insertSubstitution() and
- removeSubstitution().
-
-
-
-
- Page 12 (printed 9/22/98)
-
-
-
-
-
-
- QQQQFFFFoooonnnntttt((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQFFFFoooonnnntttt((((3333qqqqtttt))))
-
-
-
- bbbboooooooollll QQQQFFFFoooonnnntttt::::::::uuuunnnnddddeeeerrrrlllliiiinnnneeee (((()))) ccccoooonnnnsssstttt
- Returns the value set by setUnderline().
-
- Use QFontInfo to find the underline value of the window
- system font actually used for drawing.
-
- See also: setUnderline() and QFontInfo::underline().
-
- iiiinnnntttt QQQQFFFFoooonnnntttt::::::::wwwweeeeiiiigggghhhhtttt (((()))) ccccoooonnnnsssstttt
- Returns the weight set by setWeight().
-
- Use QFontInfo to find the weight of the window system font
- actually used.
-
- See also: setWeight() and QFontInfo.
-
- RRRREEEELLLLAAAATTTTEEEEDDDD FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
- QQQQDDDDaaaattttaaaaSSSSttttrrrreeeeaaaammmm &&&& ooooppppeeeerrrraaaattttoooorrrr<<<<<<<< ((((QQQQDDDDaaaattttaaaaSSSSttttrrrreeeeaaaammmm &&&& ssss,,,, ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ffff))))
- Writes a font to the stream.
-
- QQQQDDDDaaaattttaaaaSSSSttttrrrreeeeaaaammmm &&&& ooooppppeeeerrrraaaattttoooorrrr>>>>>>>> ((((QQQQDDDDaaaattttaaaaSSSSttttrrrreeeeaaaammmm &&&& ssss,,,, QQQQFFFFoooonnnntttt &&&& ffff))))
- Reads a font from the stream.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- hhhhttttttttpppp::::////////wwwwwwwwwwww....ttttrrrroooollllllll....nnnnoooo////qqqqtttt////qqqqffffoooonnnntttt....hhhhttttmmmmllll
-
- CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
- Copyright 1992-1997 Troll Tech AS. See the LICENSE file
- included in the distribution for a complete license
- statement.
-
- AAAAUUUUTTTTHHHHOOOORRRR
- Generated automatically from the source code.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 13 (printed 9/22/98)
-
-
-
-